Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete upload route #1251

Merged
merged 1 commit into from
Jul 30, 2023
Merged

Remove obsolete upload route #1251

merged 1 commit into from
Jul 30, 2023

Conversation

manuteleco
Copy link
Contributor

@manuteleco manuteleco commented Jul 17, 2023

POSTing to /storage/v1/b/my-bucket/o to upload an object is not supposed to work. The Google Cloud Storage API returns a 400 error with a response body like this:

{
  "error": {
    "code": 400,
    "message": "Uploads must be sent to the upload URL. Re-send this request to https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=test.txt",
    "errors": [
      {
        "message": "Uploads must be sent to the upload URL. Re-send this request to https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=test.txt",
        "domain": "global",
        "reason": "wrongUrlForUpload"
      }
    ]
  }
}

To stay true to the GCS API, we remove support from the fake-gcs-server as well.

Copy link
Owner

@fsouza fsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Owner

@fsouza fsouza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you take a look at the test failure?

POSTing to `/storage/v1/b/my-bucket/o` to upload an object
is not supposed to work. The Google Cloud Storage API returns a 400
error with a response body like this:

```json
{
  "error": {
    "code": 400,
    "message": "Uploads must be sent to the upload URL. Re-send this request to https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=test.txt",
    "errors": [
      {
        "message": "Uploads must be sent to the upload URL. Re-send this request to https://storage.googleapis.com/upload/storage/v1/b/my-bucket/o?uploadType=media&name=test.txt",
        "domain": "global",
        "reason": "wrongUrlForUpload"
      }
    ]
  }
}
```

To stay true to the GCS API, we remove support from the
`fake-gcs-server` as well.
@fsouza fsouza merged commit 94427ae into fsouza:main Jul 30, 2023
29 checks passed
@manuteleco manuteleco deleted the remove_obsolete_upload_route branch July 30, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants